home *** CD-ROM | disk | FTP | other *** search
- %case include%
- %if classname = CTable%
- #include <CAMTable.h>
- %else%
- #include "%classname%.h"
- %endif%
- %case include.override%
- %if classname = CTable%
- #include <CAMTable.h>
- %endif%
- %case classDecl%
- %if classname = CTable%
- class CAMTable;
- %else%
- class %classname%;
- %endif%
- %case instance%
- %if classname = CTable%
- CAMTable *%itemname%;
- %else%
- %classname%% %*%itemname%;
- %endif%
- %case create%
-
- %if classname = CTable%
- %itemname% = New%itemname% ();
- %else%
- %itemname% = new %classname%;
- %endif%
- %itemname%->IViewRes ('%paneType%', %paneID%, %enclosure%, supervisor);
- %if defined itsPanorama%
- %set itsPanorama = itemname%
- %endif%
- %case zAuxiliaryMethod.decl%
- %if classname = CTable%
- virtual CAMTable *New%itemname% (void);
- %endif%
- %case zAuxiliaryMethod%
- %if classname = CTable%
- /*----------*/
- // The only purpose of this function is so that you can override it
- // to create the list as your subclass of CAMTable
-
- %if window%
- CAMTable *Z%windname%::New%itemname% (void)
- %else%
- CAMTable *Z%dlogname%::New%itemname% (void)
- %endif%
- {
- CAMTable *theList;
-
- theList = new CAMTable;
- return (theList);
-
- } /* New%itemname% */
-
- %endif%
- %case auxiliaryClass%
- %if classname = CTable%
- /*----------*/
- class C%itemname% : public CAMTable {
- public:
- void IViewTemp (CView *anEnclosure,
- CBureaucrat *aSupervisor,
- Ptr viewData); // is override
- void GetCellText (Cell aCell,
- short availableWidth,
- StringPtr itsText); // is override
- }; /* C%itemname% */
-
- %endif%
- %case auxiliaryMethod.decl%
- %if classname = CTable%
- CAMTable *New%itemname% (void); // is override
- %endif%
- %case auxiliaryMethod%
- %if classname = CTable%
- /*----------*/
- void C%itemname%::IViewTemp% %(CView *anEnclosure,
- CBureaucrat *aSupervisor,
- Ptr viewData)
- {
- inherited::IViewTemp (anEnclosure, aSupervisor, viewData);
-
- // any additional initialization for your subclass
- AddRow (4, 0); // e.g., add 4 rows at the beginning of the list
-
- } /* IViewTemp */
-
- /*----------*/
- void C%itemname%::GetCellText% %(Cell aCell,
- short availableWidth,
- StringPtr itsText)
- {
- // replace with your own code which uses the cell coordinates
- // to access your private data structures,
- // then convert the cell data to a Str255
-
- switch (aCell.v) {
- case 0:
- CopyPString ("\pOne", itsText);
- break;
- case 1:
- CopyPString ("\pTwo", itsText);
- break;
- case 2:
- CopyPString ("\pThree", itsText);
- break;
- default:
- CopyPString ("\pInfinity", itsText);
- break;
- }; /* switch */
-
- } /* GetCellText */
-
- /*----------*/
- // This overrides the parent's New%itemname% to create a subclass of CAMTable
-
- %if window%
- CAMTable *C%windname%::New%itemname% (void)
- %else%
- CAMTable *C%dlogname%::New%itemname% (void)
- %endif%
- {
- C%itemname% *theList;
-
- theList = new C%itemname%;
- return (theList);
-
- } /* New%itemname% */
-
- %endif%
- %case ProviderChanged%
- if (aProvider == %itemname%) {
- if (%itemname%->HasSelection ()) {
- // perhaps activate some buttons
- } else {
- // perhaps deactivate
- }
- }
-